/*	打印	1  2  3  4  5
 *			6  7  8  9  10
 *			11 12 13 14 15
 *			16 17 18 19 20 
 *			21 22 23 24 25
 *	保存在二维数组中.
 *	所有内容按顺序保存在文件中.
 */

#include<stdio.h>

int main () {
	int arr[5][5] = {0};
	int size = 0;
	for (int i = 0; i < 5; i++) {
		for (int j = 0; j < 5; j++) {
			arr[i][j] = i * 5 + j + 1;
		}
	}

	FILE *p_file = fopen("double.bin", "wb");
	if (p_file != 0) {
		size = fwrite(arr, sizeof(int), 5 * 5, p_file);
		printf("实际操作的存储区个数%d\n", size);
		fclose(p_file);
		p_file = NULL;
	}
	return 0;
}
